package xiao.trip.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

@Configuration
public class websocket {

        @Bean//注入ServerEndpointExporter bean对象，自动注册使用了@ServerEndpointExporter注解的bean
        //spring自动扫描ServerEndpoint注解并且创建对象
        public ServerEndpointExporter serverEndpointExporter()
        {
            return  new ServerEndpointExporter();
        }

}
